Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reworded explanation of calculating namespace when IgnoreMaxNamespace is set #134

Merged

Conversation

ivan-gavran
Copy link
Collaborator

@ivan-gavran ivan-gavran commented Mar 14, 2023

Overview

This PR rephrases the explanation on how the namespace range is calculated when the parameter IgnoreMaxNamespace is set. If merged, it will close #133 .

I tried to simplify sentences explaining the logic and add a precise expression at the end of the explanation.

rendered document

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 seems clearer to me, thanks!

@rootulp rootulp requested a review from staheri14 March 14, 2023 16:15
@rootulp rootulp added the documentation Improvements or additions to documentation label Mar 14, 2023
@codecov
Copy link

codecov bot commented Mar 14, 2023

Codecov Report

Merging #134 (d0b415c) into master (8be15c4) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #134   +/-   ##
=======================================
  Coverage   96.33%   96.33%           
=======================================
  Files           6        6           
  Lines         464      464           
=======================================
  Hits          447      447           
  Misses         11       11           
  Partials        6        6           
Impacted Files Coverage Δ
hasher.go 96.29% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@staheri14 staheri14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it looks clearer to me too! I added a small suggestion below.

docs/nmt-lib.md Outdated Show resolved Hide resolved
docs/nmt-lib.md Outdated Show resolved Hide resolved
ivan-gavran and others added 3 commits March 15, 2023 09:08
Co-authored-by: Evan Forbes <42654277+evan-forbes@users.noreply.github.com>
docs/nmt-lib.md Outdated

Concretely, for a node `n` with children `l` and `r`, the namespace ID is the largest namespace value from `l` and `r` smaller than `maxPossibleNamespace`, if such a namespace ID exists.
Otherwise, if all candidate values are equal to `maxPossibleNamespace`, the namespace ID of `n` is set to `maxPossibleNamespace`.
Precisely, if a set `C = {ns `$\in$` {l.minNs, l.maxNs, r.minNs, r.maxNs}: ns < maxPossibleNamespace}` is not empty, `n.maxNs = max(C)`. If `C` is empty, `n.maxNs = maxPossibleNamespace`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we just need to fix the linter errors, and then we should be able to merge 🙂

docs/nmt-lib.md:53:36 MD038/no-space-in-code Spaces inside code span elements [Context: "` {l.minNs, l.maxNs, r.minNs, ..."]
docs/nmt-lib.md:53:21 MD038/no-space-in-code Spaces inside code span elements [Context: "`C = {ns `"]

@evan-forbes evan-forbes merged commit 25711ba into celestiaorg:master Mar 15, 2023
@gitpoap-bot
Copy link

gitpoap-bot bot commented Mar 15, 2023

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

GitPOAP: 2023 Celestia Contributor:

GitPOAP: 2023 Celestia Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unclear explanation of namespace calculation when IgnoreMaxNamespace is set
4 participants